/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

import java.sql.Timestamp;

/**
 *
 * @author quangphuc
 */
public class CKhuyen_mai extends CTao{
    public CKhuyen_mai(){
    }
    private String loaikm;
    public void setLoaiKm(String lkm){
        this.loaikm = lkm;
    }
    public String getLoaiKm(){
        return this.loaikm;
    }
    private Timestamp tuNgay;
    public void setTuNgay(Timestamp tu_ngay){
        this.tuNgay = tu_ngay;
    }
    public Timestamp getTuNgay(){
        return this.tuNgay;
    }
    private Timestamp denNgay;
    public void setDenNgay(Timestamp den_ngay){
        this.denNgay = den_ngay;
    }
    public Timestamp getDenNgay(){
        return this.denNgay;
    }
    private Boolean ap_dung;
    public void setApDung(Boolean ap_dung){
        this.ap_dung = ap_dung;
    }
    public Boolean getApDung(){
        return this.ap_dung;
    }
    private String mat_hang_mua;
    public void setMatHangMua(String mat_hang_mua){
        this.mat_hang_mua = mat_hang_mua;
    }
    public String getMatHangMua(){
        return this.mat_hang_mua;
    }
    
    private String mat_hang_tang;
    public void setMatHangTang(String mht){
        this.mat_hang_tang = mht;
    }
    public String getMatHangTang(){
        return this.mat_hang_tang;
    }
    private double giam_gia;
    public void setGiamGia(double giam_gia){
        this.giam_gia = giam_gia;
    }
    public double getGiamGia() {
        return this.giam_gia;
    }
    
    private String mota;
    public void setMoTa(String mota){
        this.mota = mota;
    }
    public String getMota(){
        return this.mota;
    }
    private Boolean loai_kh_ap_dung;
    public void setLoaiKH_AD(Boolean kh_ad){
        this.loai_kh_ap_dung = kh_ad;
    }
    public Boolean getLoaiKH_AD(){
        return this.loai_kh_ap_dung;
    }
    
    private long km_id;
    public void setKmId(long km){
        this.km_id = km;
    }
    public long getKmId(){
        return this.km_id;
    }
    public String toString(){
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append("{");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.id,this.getId() ));
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.mat_hang_mua,this.getMatHangMua()));        
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.mat_hang_tang,this.getMatHangTang()));        
        sBuilder.append("}");
        return sBuilder.toString();
    }
}
